<?php
	require_once(dirname(__FILE__)."/../include/admin/presentation_data.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh" xml:lang="zh">
<head>
	<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	<script type="text/javascript">
//<![CDATA[
function getpath(pname)
{
	obj=document.getElementById(pname);
	return obj.value;
}
function show()
{
	obj=document.getElementById("show");
	innerHTML="<";
	innerHTML+="img ";
	innerHTML+="style='width:400px' ";
	innerHTML+="src='";
	innerHTML+=getpath("userfile");
	innerHTML+="' ";
	innerHTML+="/";
	innerHTML+=">";
	window.alert(innerHTML);
	obj.innerHTML=innerHTML;
}
//]]>
</script>
	<title>上传幻灯片</title>
</head>
<body>
	<div style="width:80%">
		<div>
			<h2 style="color:green">上传新的幻灯片</h2>
			<form enctype="multipart/form-data" action="#" method="post">
				<input type="hidden" name="MAX_FILE_SIZE" value="1024000" />
				<input type="file" name="userfile" id="userfile" value="选择文件" />
				<input type="submit" name="send" value="开始上传" />
			</form>

			<br />
			<h2 style="color:green">服务器上已存在的幻灯片</h2>
			<table style="width:80%" cellspacing="0" cellpadding="0" border="1">
				<tr>
					<th style="padding-left:10px">图片展示</th>
					<th style="padding-left:10px">操作</th>
				</tr>
<?php
	foreach($PageArray["imagelist"] as $Object){
?>
				<form action="#" method="post">
					<input type="hidden" name="src" value="<?php echo $Object->src; ?>" />
					<tr>
						<td style="padding:10px 20px 10px 20px;width:500px">
							<img style="width:500px" src="<?php echo '../'.$Object->src;?>" />
							<br />
							<br />
							<?php echo "上传人:&nbsp;&nbsp;".$Object->user;?>
							<br />
							<?php echo "上传人IP:&nbsp;".$Object->ip; ?>
							<br />
							<?php echo "图片大小:&nbsp;".sprintf("%.2f", $Object->size/1024)."kb"; ?>
							<br />
							<?php echo "上传时间:&nbsp;".$Object->time; ?>
							<br />
						</td>
						<td style="padding-left:10px">
							<input value="删除" type="submit" name="delete" />
						</td>
					</tr>
				</form>
				<?php } ?>
			</table>
		</div>
	</div>
</body>
</html>
<?php 
/*
与文件上传有关的文件和选项参数
php.ini
apache.ini
file_uploads:
upload_tmp_dir:
upload_max_filesize:
post_max_size:
max_input_time:
memory_limit:
max_execution_time:
*/
?>